<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>

<s:form name="formBody" id="formBody">

<s:hidden name="start"/>
<s:hidden name="count"/>
<s:hidden name="orderBy"/>
<s:hidden name="ascDesc"/>
<s:hidden name="previousPage"/>
<s:hidden name="gotoPage"/>
<s:hidden name="actionMethod" value="%{actionMethod}"/>
<s:token/>

<div class="header"><span><span class="ico gray administrator"></span>List Activity Logs</span>
</div><!-- End header -->	
<div class="content" >
	
		<!-- Third / Half column-->
		<div class="widgets">
		
		<div class="oneTwo">
			<div class="section ">
				<label><s:text name="label.startTime"/><small>Waktu ketika aktivitas dimulai</small></label>   
				<div> 
					<s:textfield cssClass="large" id="startTime" 
				    			 readonly="readonly" name="startTime" labelposition="left"/>
				</div>
			</div>
			
			<div class="section ">
				<label>Username<small>Username yang melakukan aktivitias</small></label>   
				<div> 
					<s:textfield cssClass="validate[required] large" name="userInActivity"
								labelposition="left" maxlength="20" id="userInActivity"/>
				</div>
			</div>
			
			<div class="section last">
	            <div>
	            	<s:reset cssClass="uibutton special" value="RESET" cssStyle="width:100px"/>
	            	<s:submit action="%{actionMethod}" value="SEARCH" indicator="indicator" cssClass="uibutton" cssStyle="width:100px"/> 
	           	</div>
	        </div>
		</div>
			
		<div class="oneTwo">
			
			<div class="section ">
				<label><s:text name="label.endTime"/><small>Waktu ketika aktivitas berakhir</small></label>   
				<div> 
				    <s:textfield cssClass="validate[required] large" id="endTime" 
				    			 readonly="readonly" name="endTime" labelposition="left"/>
				</div>
			</div>
		  
		</div>
		
	
   <!-- clear fix -->
<div class="clear"></div>

</div><!-- End content -->

<div class="content" >

		<div class="tableName">
		
		<table class="display data_table1">
			<thead>
				<tr>
					<th style="text-align:left"><div class="th_wrapp"><s:text name="label.no"/></div></th>
					<th style="text-align:left"><div class="th_wrapp"><s:text name="label.activityType"/></div></th>
					<th style="text-align:left"><div class="th_wrapp"><s:text name="label.startTime"/></div></th>
					<th style="text-align:left"><div class="th_wrapp"><s:text name="label.endTime"/></div></th>
					<th style="text-align:left"><div class="th_wrapp"><s:text name="label.remarks"/></div></th>
					<th style="text-align:left"><div class="th_wrapp"><s:text name="label.user"/></div></th>
					<th style="text-align:left"><div class="th_wrapp"><s:text name="label.status"/></div></th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="activityLogs" status="sequence">
				<tr class="odd gradeX">
				    <td style="text-align:left"><s:property value="%{start+#sequence.index+1}"/></td>
				    <td style="text-align:left"><s:if test="activityTypes!=null"><s:property value="activityTypes.description"/></s:if><s:else>-</s:else></td>
				    <td style="text-align:left"><s:date name="startTime" format="dd MMMM yyyy HH:mm:ss"/></td>
				    <td style="text-align:left"><s:date name="endTime" format="dd MMMM yyyy HH:mm:ss"/></td>
				    <td style="text-align:left"><s:property value="remarks" escape="false"/></td>
				    <td style="text-align:left"><s:if test="loginId!=null"><s:property value="loginId"/></s:if><s:else>-</s:else></td>
				    <td style="text-align:left">
				    	<s:if test="status=='Y'"><span style="color: #009933;font-weight:bold;">SUCCESS</span></s:if>
                        <s:else><span style="color:#C60C08;font-weight:bold;">FAILED</span></s:else>
					</td>
				</tr>
				</s:iterator>
			</tbody>
		</table>
		
		<div>
			<s:property value="%{pagerItem}" escape="false"/>
			<div class="clear"></div>
		</div>
		
		</div>
	
   <!-- clear fix -->
<div class="clear"></div>

</div><!-- End content -->
</s:form>